﻿<?php include 'header.php' ?>
<div class="main" style="">
  <?php include 'left.php' ?>
  <?PHP
  $sql="select sp.web_ui from GPS_SYS_PEOPLE sa, sys_permission sp where sa.ROLE_ID = sp.permission_index and sa.user_id =".$_SESSION['id']."";
 $menuarr=$DBsql->fetch_one_array($sql);
$sql="select * from sys_web_ui swu where swu.web_ui_index in (".$menuarr['WEB_UI'].") and swu.web_ui_id=0 and swu.WEB_UI_VALID=1";
$menu=$DBsql->fetch_all_array($sql);
foreach($menu as $key=>$value){
	$arrstr[]=$value['WEB_UI_METHOD'];
	}
 ?>
  <div class="right">
    <div id="iCenter">
      <div class="pt">
        <p>欢迎登录诺特位置服务平台！</p>
        <p id="time_now"></p>
        <!--<p>上次登录时间：2011-7-5 19:21:16</p>-->
        <p id="login_IP"> 登录IP：
          <?php
		 	$onlineip = '';
			if(getenv('HTTP_CLIENT_IP') && strcasecmp(getenv('HTTP_CLIENT_IP'), 'unknown')) {
			$onlineip = getenv('HTTP_CLIENT_IP');
			} elseif(getenv('HTTP_X_FORWARDED_FOR') && strcasecmp(getenv('HTTP_X_FORWARDED_FOR'), 'unknown')) {
			$onlineip = getenv('HTTP_X_FORWARDED_FOR');
			} elseif(getenv('REMOTE_ADDR') && strcasecmp(getenv('REMOTE_ADDR'), 'unknown')) {
			$onlineip = getenv('REMOTE_ADDR');
			} elseif(isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], 'unknown')) {
			$onlineip = $_SERVER['REMOTE_ADDR'];
			}
			echo $onlineip;
         ?>
        </p>
        <p class="xt"></p>
        <div class="list_div">
          <ul class="list_menu">
            <?PHP
 $arr=array(array('Location','定位管理'),array('AlertInfo','告警管理'),array('ManageCar','车辆申请'),array('ManageFee','费用管理'),array('InfoTongji','信息统计'),array('ManageInfo','系统设置'));
$arrstrs="";
foreach($arrstr as $key=>$value){
		for($i=0;$i<count($arr);++$i){
		if($arr[$i][0]==$value)
	    $arrstrs.="<li><a href='#'><div onClick='showDL(\"".$arr[$i][0]."\")'><img src='images/".$value.".jpg' height='66' width='66' /><p>".$arr[$i][1]."</p></div></a></li>";
		}}
		echo $arrstrs;
?>
            <div class="clear"></div>
          </ul>
        </div>
        <!--endlist-->
        <p style="width:80%; line-height:22px;"><strong>定位功能要求</strong>：需提供基站定位和GPS定位两种定位方式。</p>
        <p style="width:80%; line-height:22px;"><strong>使用功能要求</strong>：实现与诺特地理信息系统GPS提供基于互联网的定位平台，供公使用者临时调度和监控使用。</p>
      </div>
    </div>
  </div>
  <div class="clear"></div>
</div>
<!--end main-->
<?php include 'footer.php' ?>
<script language="javascript">
//获取当前时间
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
	clearTimeout(timerID);
	timerRunning = false;
}
function startclock () {
	stopclock();
	showtime();
}
function showtime () {
	var now = new Date();
	var hours = now.getHours();
	var minutes = now.getMinutes();
	var seconds = now.getSeconds();
	timeValue = (hours);
	timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
	timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
	if(document.getElementById('time_now')){
		document.getElementById('time_now').innerHTML = '当前日期：'+now.getFullYear()+"-"+(now.getMonth()+1)+"-"+now.getDate() +' '+ timeValue;
	}
	timerID = setTimeout("showtime()",1000);
	timerRunning = true;
}
startclock();
</script>